home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1996-02-12 | 7.6 KB | [TEXT/MSET] |
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
You can browse this item here: longMath
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Mon Feb 12 19:14:22 1996, modified Mon Feb 12 19:14:22 1996, creator 'MSET', type ASCII, 7201 bytes "longMath" , at 0x1ca1 381 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [MSET] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 08 6c 6f 6e 67 4d 61 | 74 68 00 00 00 00 00 00 |..longMa|th......|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 53 45 | 54 01 00 00 00 00 00 00 |.TEXTMSE|T.......|
|00000050| 00 00 00 00 00 1c 21 00 | 00 01 7d ad 45 88 5e ad |......!.|..}.E.^.|
|00000060| 45 88 5e 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |E.^.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 a2 d5 00 00 |........|........|
|00000080| 5c 20 4c 6f 6e 67 20 61 | 72 69 74 68 6d 65 74 69 |\ Long a|rithmeti|
|00000090| 63 2e 09 6d 72 68 20 20 | 41 75 67 20 39 30 2e 0d |c..mrh |Aug 90..|
|000000a0| 0d 5c 20 4a 75 6e 20 39 | 32 09 33 32 2d 62 69 74 |.\ Jun 9|2.32-bit|
|000000b0| 20 36 38 30 30 30 20 63 | 6f 64 65 20 6d 6f 76 65 | 68000 c|ode move|
|000000c0| 64 20 74 6f 20 6d 61 69 | 6e 20 64 69 63 2e 20 20 |d to mai|n dic. |
|000000d0| 52 65 6d 6f 76 65 64 20 | 2f 20 61 6e 64 20 2f 6d |Removed |/ and /m|
|000000e0| 6f 64 20 66 72 6f 6d 20 | 68 65 72 65 0d 5c 09 73 |od from |here.\.s|
|000000f0| 69 6e 63 65 20 6d 61 69 | 6e 20 64 69 63 20 76 65 |ince mai|n dic ve|
|00000100| 72 73 69 6f 6e 73 20 61 | 72 65 20 6e 6f 77 20 33 |rsions a|re now 3|
|00000110| 32 2d 62 69 74 2e 0d 5c | 20 53 65 70 74 20 39 32 |2-bit..\| Sept 92|
|00000120| 09 52 65 76 69 73 65 64 | 20 74 6f 20 73 75 70 70 |.Revised| to supp|
|00000130| 6f 72 74 20 74 68 65 20 | 41 4e 53 49 20 73 74 61 |ort the |ANSI sta|
|00000140| 6e 64 61 72 64 2e 0d 0d | 5c 20 54 68 69 73 20 66 |ndard...|\ This f|
|00000150| 69 6c 65 20 69 6d 70 6c | 65 6d 65 6e 74 73 20 64 |ile impl|ements d|
|00000160| 6f 75 62 6c 65 2d 6c 65 | 6e 67 74 68 20 28 36 34 |ouble-le|ngth (64|
|00000170| 20 62 69 74 29 20 61 64 | 64 69 74 69 6f 6e 20 61 | bit) ad|dition a|
|00000180| 6e 64 20 73 75 62 74 72 | 61 63 74 69 6f 6e 2c 0d |nd subtr|action,.|
|00000190| 5c 20 33 32 2a 33 32 2d | 3e 36 34 20 6d 75 6c 74 |\ 32*32-|>64 mult|
|000001a0| 69 70 6c 69 63 61 74 69 | 6f 6e 20 61 6e 64 20 36 |iplicati|on and 6|
|000001b0| 34 2f 33 32 2d 3e 33 32 | 20 64 69 76 69 73 69 6f |4/32->32| divisio|
|000001c0| 6e 2c 20 61 6e 64 20 76 | 65 72 73 69 6f 6e 73 20 |n, and v|ersions |
|000001d0| 6f 66 20 2a 2f 20 61 6e | 64 20 2a 2f 4d 4f 44 0d |of */ an|d */MOD.|
|000001e0| 5c 20 77 68 69 63 68 20 | 68 61 76 65 20 61 20 36 |\ which |have a 6|
|000001f0| 34 2d 62 69 74 20 69 6e | 74 65 72 6d 65 64 69 61 |4-bit in|termedia|
|00000200| 74 65 20 72 65 73 75 6c | 74 2e 0d 5c 20 54 68 69 |te resul|t..\ Thi|
|00000210| 73 20 62 65 68 61 76 69 | 6f 72 20 69 73 20 72 65 |s behavi|or is re|
|00000220| 71 75 69 72 65 64 20 62 | 79 20 74 68 65 20 41 4e |quired b|y the AN|
|00000230| 53 49 20 73 74 61 6e 64 | 61 72 64 2c 20 64 65 66 |SI stand|ard, def|
|00000240| 69 6e 65 64 20 69 6e 20 | 74 65 72 6d 73 20 6f 66 |ined in |terms of|
|00000250| 20 63 65 6c 6c 73 2e 0d | 5c 20 49 74 20 6d 61 79 | cells..|\ It may|
|00000260| 20 62 65 20 6f 76 65 72 | 6b 69 6c 6c 20 66 6f 72 | be over|kill for|
|00000270| 20 4d 6f 70 73 20 77 68 | 69 63 68 20 68 61 73 20 | Mops wh|ich has |
|00000280| 33 32 2d 62 69 74 20 63 | 65 6c 6c 73 2c 20 73 6f |32-bit c|ells, so|
|00000290| 20 77 65 20 64 6f 6e 27 | 74 20 70 75 74 20 69 74 | we don'|t put it|
|000002a0| 20 69 6e 20 74 68 65 0d | 5c 20 6e 75 63 6c 65 75 | in the.|\ nucleu|
|000002b0| 73 2c 20 62 75 74 20 70 | 72 6f 76 69 64 65 20 69 |s, but p|rovide i|
|000002c0| 74 20 68 65 72 65 20 61 | 73 20 61 6e 20 6f 70 74 |t here a|s an opt|
|000002d0| 69 6f 6e 2e 0d 0d 3a 63 | 6f 64 65 20 53 3e 44 0d |ion...:c|ode S>D.|
|000002e0| 09 09 6c 6f 63 0d 09 09 | 6d 6f 76 65 09 28 61 36 |..loc...|move.(a6|
|000002f0| 29 2c 64 30 0d 09 09 62 | 6d 69 2e 73 09 6d 6e 09 |),d0...b|mi.s.mn.|
|00000300| 09 09 09 3b 20 54 68 69 | 73 20 69 73 20 71 75 69 |...; Thi|s is qui|
|00000310| 63 6b 65 72 20 74 68 61 | 6e 20 74 77 6f 20 45 58 |cker tha|n two EX|
|00000320| 54 27 73 0d 09 09 63 6c | 72 2e 6c 09 2d 28 61 36 |T's...cl|r.l.-(a6|
|00000330| 29 0d 09 09 72 74 73 0d | 0d 6d 6e 09 09 6d 6f 76 |)...rts.|.mn..mov|
|00000340| 65 71 09 23 2d 31 2c 64 | 30 0d 09 09 70 75 73 68 |eq.#-1,d|0...push|
|00000350| 2e 6c 09 64 30 0d 3b 63 | 6f 64 65 0d 0d 3a 63 6f |.l.d0.;c|ode..:co|
|00000360| 64 65 20 44 4e 45 47 0d | 09 09 6e 65 67 09 34 28 |de DNEG.|..neg.4(|
|00000370| 61 36 29 0d 09 09 6e 65 | 67 78 09 28 61 36 29 0d |a6)...ne|gx.(a6).|
|00000380| 3b 63 6f 64 65 0d 0d 3a | 63 6f 64 65 20 44 2b 0d |;code..:|code D+.|
|00000390| 09 09 6d 6f 76 65 6d 09 | 28 61 36 29 2b 2c 64 30 |..movem.|(a6)+,d0|
|000003a0| 2d 64 32 0d 09 09 61 64 | 64 09 09 64 31 2c 28 61 |-d2...ad|d..d1,(a|
|000003b0| 36 29 0d 09 09 61 64 64 | 78 09 64 30 2c 64 32 0d |6)...add|x.d0,d2.|
|000003c0| 09 09 70 75 73 68 09 64 | 32 0d 3b 63 6f 64 65 0d |..push.d|2.;code.|
|000003d0| 0d 3a 63 6f 64 65 20 44 | 2d 0d 09 09 6d 6f 76 65 |.:code D|-...move|
|000003e0| 6d 09 28 61 36 29 2b 2c | 64 30 2d 64 32 0d 09 09 |m.(a6)+,|d0-d2...|
|000003f0| 73 75 62 09 09 64 31 2c | 28 61 36 29 0d 09 09 73 |sub..d1,|(a6)...s|
|00000400| 75 62 78 09 64 30 2c 64 | 32 0d 09 09 70 75 73 68 |ubx.d0,d|2...push|
|00000410| 09 64 32 0d 3b 63 6f 64 | 65 0d 0d 3a 63 6f 64 65 |.d2.;cod|e..:code|
|00000420| 20 44 3c 09 6c 6f 63 0d | 09 09 6d 6f 76 65 6d 09 | D<.loc.|..movem.|
|00000430| 28 61 36 29 2b 2c 64 30 | 2d 64 32 0d 09 09 63 6d |(a6)+,d0|-d2...cm|
|00000440| 70 09 09 64 30 2c 64 32 | 0d 09 09 62 6c 74 2e 73 |p..d0,d2|...blt.s|
|00000450| 09 73 65 74 54 72 75 65 | 0d 09 09 62 67 74 2e 73 |.setTrue|...bgt.s|
|00000460| 09 73 65 74 46 61 6c 73 | 65 0d 09 09 63 6d 70 09 |.setFals|e...cmp.|
|00000470| 09 28 61 36 29 2c 64 31 | 0d 09 09 62 68 69 2e 73 |.(a6),d1|...bhi.s|
|00000480| 09 73 65 74 54 72 75 65 | 0d 0d 73 65 74 46 61 6c |.setTrue|..setFal|
|00000490| 73 65 0d 09 09 63 6c 72 | 09 09 28 61 36 29 0d 09 |se...clr|..(a6)..|
|000004a0| 09 72 74 73 0d 0d 73 65 | 74 54 72 75 65 09 6d 6f |.rts..se|tTrue.mo|
|000004b0| 76 65 71 09 23 2d 31 2c | 64 30 0d 09 09 6d 6f 76 |veq.#-1,|d0...mov|
|000004c0| 65 09 64 30 2c 28 61 36 | 29 0d 3b 63 6f 64 65 0d |e.d0,(a6|).;code.|
|000004d0| 0d 3a 63 6f 64 65 20 44 | 3e 0d 09 09 6d 6f 76 65 |.:code D|>...move|
|000004e0| 6d 09 28 61 36 29 2b 2c | 64 30 2d 64 32 0d 09 09 |m.(a6)+,|d0-d2...|
|000004f0| 63 6d 70 09 09 64 30 2c | 64 32 0d 09 09 62 67 74 |cmp..d0,|d2...bgt|
|00000500| 2e 73 09 73 65 74 54 72 | 75 65 0d 09 09 62 6c 74 |.s.setTr|ue...blt|
|00000510| 2e 73 09 73 65 74 46 61 | 6c 73 65 0d 09 09 63 6d |.s.setFa|lse...cm|
|00000520| 70 09 09 28 61 36 29 2c | 64 31 0d 09 09 62 6c 6f |p..(a6),|d1...blo|
|00000530| 2e 73 09 73 65 74 54 72 | 75 65 0d 09 09 62 72 61 |.s.setTr|ue...bra|
|00000540| 2e 73 09 73 65 74 46 61 | 6c 73 65 0d 3b 63 6f 64 |.s.setFa|lse.;cod|
|00000550| 65 0d 0d 3a 63 6f 64 65 | 20 44 3d 0d 09 09 6d 6f |e..:code| D=...mo|
|00000560| 76 65 6d 09 28 61 36 29 | 2b 2c 64 30 2d 64 32 0d |vem.(a6)|+,d0-d2.|
|00000570| 09 09 63 6d 70 09 64 30 | 2c 64 32 0d 09 09 62 6e |..cmp.d0|,d2...bn|
|00000580| 65 2e 73 09 73 65 74 46 | 61 6c 73 65 0d 09 09 63 |e.s.setF|alse...c|
|00000590| 6d 70 09 28 61 36 29 2c | 64 31 0d 09 09 62 6e 65 |mp.(a6),|d1...bne|
|000005a0| 2e 73 09 73 65 74 46 61 | 6c 73 65 0d 09 09 62 72 |.s.setFa|lse...br|
|000005b0| 61 2e 73 09 73 65 74 54 | 72 75 65 0d 3b 63 6f 64 |a.s.setT|rue.;cod|
|000005c0| 65 0d 0d 0d 5c 20 54 68 | 65 20 73 6f 6d 65 77 68 |e...\ Th|e somewh|
|000005d0| 61 74 20 64 72 65 61 64 | 65 64 20 6d 75 6c 74 69 |at dread|ed multi|
|000005e0| 70 6c 79 20 72 6f 75 74 | 69 6e 65 73 0d 0d 3a 63 |ply rout|ines..:c|
|000005f0| 6f 64 65 20 4c 4f 4e 47 | 4d 55 4c 54 09 09 3b 20 |ode LONG|MULT..; |
|00000600| 53 75 62 72 6f 75 74 69 | 6e 65 20 74 6f 20 64 6f |Subrouti|ne to do|
|00000610| 20 6c 6f 6e 67 20 75 6e | 73 69 67 6e 65 64 20 6d | long un|signed m|
|00000620| 75 6c 74 69 70 6c 79 2e | 20 20 55 73 65 73 20 44 |ultiply.| Uses D|
|00000630| 30 2d 32 2e 0d 09 09 6c | 6f 63 0d 09 09 70 6f 70 |0-2....l|oc...pop|
|00000640| 2e 6c 09 64 30 0d 09 09 | 6d 6f 76 65 2e 6c 09 28 |.l.d0...|move.l.(|
|00000650| 61 36 29 2c 64 31 0d 09 | 09 63 6c 72 2e 6c 09 2d |a6),d1..|.clr.l.-|
|00000660| 28 61 36 29 0d 09 09 6d | 6f 76 65 2e 77 09 64 31 |(a6)...m|ove.w.d1|
|00000670| 2c 64 32 0d 09 09 6d 75 | 6c 75 09 64 30 2c 64 32 |,d2...mu|lu.d0,d2|
|00000680| 0d 09 09 6d 6f 76 65 2e | 6c 09 64 32 2c 34 28 61 |...move.|l.d2,4(a|
|00000690| 36 29 0d 09 09 6d 6f 76 | 65 2e 6c 09 64 31 2c 64 |6)...mov|e.l.d1,d|
|000006a0| 32 0d 09 09 73 77 61 70 | 09 64 32 0d 09 09 6d 75 |2...swap|.d2...mu|
|000006b0| 6c 75 09 64 30 2c 64 32 | 0d 09 09 61 64 64 2e 6c |lu.d0,d2|...add.l|
|000006c0| 09 64 32 2c 32 28 61 36 | 29 0d 09 09 73 77 61 70 |.d2,2(a6|)...swap|
|000006d0| 09 64 30 0d 09 09 6d 6f | 76 65 2e 77 09 64 31 2c |.d0...mo|ve.w.d1,|
|000006e0| 64 32 0d 09 09 6d 75 6c | 75 09 64 30 2c 64 32 0d |d2...mul|u.d0,d2.|
|000006f0| 09 09 61 64 64 2e 6c 09 | 64 32 2c 32 28 61 36 29 |..add.l.|d2,2(a6)|
|00000700| 0d 09 09 62 63 63 2e 73 | 09 6d 70 79 32 0d 09 09 |...bcc.s|.mpy2...|
|00000710| 61 64 64 71 2e 77 09 23 | 31 2c 28 61 36 29 0d 6d |addq.w.#|1,(a6).m|
|00000720| 70 79 32 09 6d 6f 76 65 | 2e 6c 09 64 31 2c 64 32 |py2.move|.l.d1,d2|
|00000730| 0d 09 09 73 77 61 70 09 | 64 32 0d 09 09 6d 75 6c |...swap.|d2...mul|
|00000740| 75 09 64 30 2c 64 32 0d | 09 09 61 64 64 2e 6c 09 |u.d0,d2.|..add.l.|
|00000750| 64 32 2c 28 61 36 29 0d | 3b 63 6f 64 65 0d 0d 0d |d2,(a6).|;code...|
|00000760| 3a 63 6f 64 65 20 55 4d | 2a 09 09 3b 20 55 6e 73 |:code UM|*..; Uns|
|00000770| 69 67 6e 65 64 20 6d 69 | 78 65 64 20 6d 75 6c 74 |igned mi|xed mult|
|00000780| 69 70 6c 79 0d 09 09 6c | 6f 63 0d 09 09 62 72 61 |iply...l|oc...bra|
|00000790| 2e 73 09 70 36 38 6b 20 | 20 09 09 09 3b 20 4e 4f |.s.p68k | ...; NO|
|000007a0| 50 27 64 20 6f 75 74 20 | 69 66 20 77 65 27 72 65 |P'd out |if we're|
|000007b0| 20 6f 6e 20 61 6e 20 30 | 32 30 2f 30 33 30 20 6f | on an 0|20/030 o|
|000007c0| 72 20 6c 61 74 65 72 0d | 0d 09 09 70 6f 70 2e 6c |r later.|...pop.l|
|000007d0| 09 64 31 0d 09 09 64 63 | 2e 77 09 24 34 43 31 36 |.d1...dc|.w.$4C16|
|000007e0| 2c 24 31 34 30 30 09 09 | 3b 20 6d 75 6c 75 2e 6c |,$1400..|; mulu.l|
|000007f0| 20 20 28 61 36 29 2c 64 | 30 3a 64 31 0d 09 09 6d | (a6),d|0:d1...m|
|00000800| 6f 76 65 2e 6c 09 64 31 | 2c 28 61 36 29 0d 09 09 |ove.l.d1|,(a6)...|
|00000810| 70 75 73 68 2e 6c 09 64 | 30 0d 09 09 72 74 73 0d |push.l.d|0...rts.|
|00000820| 0d 70 36 38 6b 09 74 73 | 74 2e 77 09 28 61 36 29 |.p68k.ts|t.w.(a6)|
|00000830| 09 09 09 3b 20 49 66 20 | 62 6f 74 68 20 68 69 67 |...; If |both hig|
|00000840| 68 2d 6f 72 64 65 72 20 | 77 6f 72 64 73 20 61 72 |h-order |words ar|
|00000850| 65 20 7a 65 72 6f 2c 0d | 09 09 62 6e 65 2e 73 09 |e zero,.|..bne.s.|
|00000860| 64 69 63 5b 6c 6f 6e 67 | 4d 75 6c 74 5d 09 3b 20 |dic[long|Mult].; |
|00000870| 20 77 65 20 63 61 6e 20 | 64 6f 20 61 20 73 68 6f | we can |do a sho|
|00000880| 72 74 20 6d 75 6c 74 69 | 70 6c 79 2e 0d 09 09 74 |rt multi|ply....t|
|00000890| 73 74 2e 77 09 34 28 61 | 36 29 0d 09 09 62 6e 65 |st.w.4(a|6)...bne|
|000008a0| 2e 73 09 64 69 63 5b 6c | 6f 6e 67 4d 75 6c 74 5d |.s.dic[l|ongMult]|
|000008b0| 0d 09 09 70 6f 70 2e 6c | 09 64 30 09 09 09 09 3b |...pop.l|.d0....;|
|000008c0| 20 59 65 73 2c 20 77 65 | 20 63 61 6e 2e 0d 09 09 | Yes, we| can....|
|000008d0| 6d 6f 76 65 2e 6c 09 28 | 61 36 29 2c 64 31 0d 09 |move.l.(|a6),d1..|
|000008e0| 09 6d 75 6c 75 09 64 30 | 2c 64 31 0d 09 09 6d 6f |.mulu.d0|,d1...mo|
|000008f0| 76 65 2e 6c 09 64 31 2c | 28 61 36 29 0d 09 09 63 |ve.l.d1,|(a6)...c|
|00000900| 6c 72 2e 6c 09 2d 28 61 | 36 29 0d 3b 63 6f 64 65 |lr.l.-(a|6).;code|
|00000910| 0d 0d 0d 3a 63 6f 64 65 | 20 4d 2a 09 09 3b 20 53 |...:code| M*..; S|
|00000920| 69 67 6e 65 64 20 6d 69 | 78 65 64 20 6d 75 6c 74 |igned mi|xed mult|
|00000930| 69 70 6c 79 0d 09 09 6c | 6f 63 0d 09 09 62 72 61 |iply...l|oc...bra|
|00000940| 2e 73 09 70 36 38 6b 20 | 20 09 09 09 3b 20 4e 4f |.s.p68k | ...; NO|
|00000950| 50 27 64 20 6f 75 74 20 | 69 66 20 77 65 27 72 65 |P'd out |if we're|
|00000960| 20 6f 6e 20 61 6e 20 30 | 32 30 2f 30 33 30 20 6f | on an 0|20/030 o|
|00000970| 72 20 6c 61 74 65 72 0d | 0d 09 09 70 6f 70 2e 6c |r later.|...pop.l|
|00000980| 09 64 31 0d 09 09 64 63 | 2e 77 09 24 34 43 31 36 |.d1...dc|.w.$4C16|
|00000990| 2c 24 31 43 30 30 09 09 | 3b 20 6d 75 6c 73 2e 6c |,$1C00..|; muls.l|
|000009a0| 20 20 28 61 36 29 2c 64 | 30 3a 64 31 0d 09 09 6d | (a6),d|0:d1...m|
|000009b0| 6f 76 65 2e 6c 09 64 31 | 2c 28 61 36 29 0d 09 09 |ove.l.d1|,(a6)...|
|000009c0| 70 75 73 68 2e 6c 09 64 | 30 0d 09 09 72 74 73 0d |push.l.d|0...rts.|
|000009d0| 0d 70 36 38 6b 09 6d 6f | 76 65 2e 6c 09 64 33 2c |.p68k.mo|ve.l.d3,|
|000009e0| 2d 28 61 37 29 09 09 3b | 20 73 61 76 65 20 44 33 |-(a7)..;| save D3|
|000009f0| 0d 09 09 74 73 74 2e 6c | 09 28 61 36 29 0d 09 09 |...tst.l|.(a6)...|
|00000a00| 73 6d 69 09 09 64 33 0d | 09 09 62 70 6c 2e 73 09 |smi..d3.|..bpl.s.|
|00000a10| 74 73 74 32 6e 64 0d 09 | 09 6e 65 67 2e 6c 09 28 |tst2nd..|.neg.l.(|
|00000a20| 61 36 29 0d 74 73 74 32 | 6e 64 09 74 73 74 2e 6c |a6).tst2|nd.tst.l|
|00000a30| 09 34 28 61 36 29 0d 09 | 09 62 70 6c 2e 73 09 64 |.4(a6)..|.bpl.s.d|
|00000a40| 6f 6d 75 6c 74 0d 09 09 | 6e 6f 74 2e 62 09 64 33 |omult...|not.b.d3|
|00000a50| 0d 09 09 6e 65 67 2e 6c | 09 34 28 61 36 29 0d 64 |...neg.l|.4(a6).d|
|00000a60| 6f 6d 75 6c 74 09 62 73 | 72 2e 73 09 64 69 63 5b |omult.bs|r.s.dic[|
|00000a70| 75 6d 2a 5d 0d 09 09 74 | 73 74 2e 62 09 64 33 0d |um*]...t|st.b.d3.|
|00000a80| 09 09 62 65 71 2e 73 09 | 64 6f 6e 65 0d 09 09 6e |..beq.s.|done...n|
|00000a90| 65 67 2e 6c 09 34 28 61 | 36 29 0d 09 09 6e 65 67 |eg.l.4(a|6)...neg|
|00000aa0| 78 09 28 61 36 29 0d 64 | 6f 6e 65 09 6d 6f 76 65 |x.(a6).d|one.move|
|00000ab0| 2e 6c 09 28 61 37 29 2b | 2c 64 33 09 09 3b 20 72 |.l.(a7)+|,d3..; r|
|00000ac0| 65 73 74 6f 72 65 20 64 | 33 0d 3b 63 6f 64 65 0d |estore d|3.;code.|
|00000ad0| 0d 0d 5c 20 44 69 76 69 | 73 69 6f 6e 2e 0d 0d 3a |..\ Divi|sion...:|
|00000ae0| 20 44 49 56 5f 4f 56 45 | 52 46 4c 4f 57 09 32 34 | DIV_OVE|RFLOW.24|
|00000af0| 20 41 72 69 74 68 45 72 | 72 20 20 3b 0d 3a 20 5a | ArithEr|r ;.: Z|
|00000b00| 45 52 4f 5f 44 49 56 09 | 09 32 35 20 41 72 69 74 |ERO_DIV.|.25 Arit|
|00000b10| 68 45 72 72 20 20 3b 0d | 0d 0d 3a 63 6f 64 65 20 |hErr ;.|..:code |
|00000b20| 20 55 4d 2f 4d 4f 44 09 | 3b 20 55 6e 73 69 67 6e | UM/MOD.|; Unsign|
|00000b30| 65 64 20 6d 69 78 65 64 | 20 64 69 76 69 73 69 6f |ed mixed| divisio|
|00000b40| 6e 2e 20 20 43 6f 64 65 | 20 6c 69 66 74 65 64 0d |n. Code| lifted.|
|00000b50| 09 09 09 09 3b 20 66 72 | 6f 6d 20 79 6f 75 72 73 |....; fr|om yours|
|00000b60| 20 74 72 75 6c 79 27 73 | 20 50 44 50 2d 31 31 20 | truly's| PDP-11 |
|00000b70| 69 6d 70 6c 65 6d 65 6e | 74 61 74 69 6f 6e 2c 0d |implemen|tation,.|
|00000b80| 09 09 09 09 3b 20 77 68 | 69 63 68 20 49 20 70 72 |....; wh|ich I pr|
|00000b90| 65 66 65 72 20 74 6f 20 | 74 68 65 20 6f 72 69 67 |efer to |the orig|
|00000ba0| 69 6e 61 6c 20 4e 65 6f | 6e 20 76 65 72 73 69 6f |inal Neo|n versio|
|00000bb0| 6e 2e 0d 09 09 6c 6f 63 | 0d 09 09 62 72 61 2e 73 |n....loc|...bra.s|
|00000bc0| 09 75 6d 6d 6f 64 09 09 | 09 3b 20 4e 4f 50 27 64 |.ummod..|.; NOP'd|
|00000bd0| 20 6f 75 74 20 69 66 20 | 77 65 27 72 65 20 6f 6e | out if |we're on|
|00000be0| 20 61 6e 20 30 32 30 2f | 30 33 30 20 6f 72 20 6c | an 020/|030 or l|
|00000bf0| 61 74 65 72 0d 0d 09 09 | 6d 6f 76 65 6d 2e 6c 09 |ater....|movem.l.|
|00000c00| 28 61 36 29 2b 2c 64 30 | 2d 64 32 09 09 3b 20 44 |(a6)+,d0|-d2..; D|
|00000c10| 69 76 69 73 6f 72 20 74 | 6f 20 44 30 2c 20 64 69 |ivisor t|o D0, di|
|00000c20| 76 69 64 65 6e 64 20 74 | 6f 20 44 31 2d 32 0d 09 |vidend t|o D1-2..|
|00000c30| 09 64 63 2e 77 09 24 34 | 43 34 30 2c 24 32 34 30 |.dc.w.$4|C40,$240|
|00000c40| 31 09 09 3b 20 64 69 76 | 75 2e 6c 20 20 64 30 2c |1..; div|u.l d0,|
|00000c50| 64 31 3a 64 32 0d 09 09 | 70 75 73 68 2e 6c 09 64 |d1:d2...|push.l.d|
|00000c60| 31 09 09 09 09 3b 20 50 | 75 73 68 20 72 65 6d 61 |1....; P|ush rema|
|00000c70| 69 6e 64 65 72 0d 09 09 | 70 75 73 68 2e 6c 09 64 |inder...|push.l.d|
|00000c80| 32 09 09 09 09 3b 20 50 | 75 73 68 20 71 75 6f 74 |2....; P|ush quot|
|00000c90| 69 65 6e 74 0d 09 09 72 | 74 73 0d 0d 75 6d 6d 6f |ient...r|ts..ummo|
|00000ca0| 64 09 74 73 74 2e 6c 09 | 28 61 36 29 0d 09 09 62 |d.tst.l.|(a6)...b|
|00000cb0| 65 71 2e 73 09 64 69 63 | 5b 7a 65 72 6f 5f 64 69 |eq.s.dic|[zero_di|
|00000cc0| 76 5d 09 3b 20 43 68 65 | 63 6b 20 66 6f 72 20 7a |v].; Che|ck for z|
|00000cd0| 65 72 6f 20 64 69 76 69 | 64 65 0d 09 09 74 73 74 |ero divi|de...tst|
|00000ce0| 2e 6c 09 34 28 61 36 29 | 09 09 09 3b 20 54 6f 70 |.l.4(a6)|...; Top|
|00000cf0| 20 33 32 20 62 69 74 73 | 20 6f 66 20 64 69 76 69 | 32 bits| of divi|
|00000d00| 64 65 6e 64 20 7a 65 72 | 6f 3f 0d 09 09 62 6e 65 |dend zer|o?...bne|
|00000d10| 2e 73 09 6c 6f 6e 67 64 | 69 76 0d 09 09 6d 6f 76 |.s.longd|iv...mov|
|00000d20| 65 2e 6c 09 28 61 36 29 | 2b 2c 28 61 36 29 09 09 |e.l.(a6)|+,(a6)..|
|00000d30| 3b 20 59 65 73 20 2d 20 | 4e 49 50 20 74 68 65 6d |; Yes - |NIP them|
|00000d40| 20 61 6e 64 20 63 61 6c | 6c 20 55 2f 4d 4f 44 20 | and cal|l U/MOD |
|00000d50| 28 66 61 73 74 65 72 29 | 0d 09 09 6a 6d 70 09 64 |(faster)|...jmp.d|
|00000d60| 69 63 5b 75 2f 6d 6f 64 | 5d 0d 0d 6c 6f 6e 67 64 |ic[u/mod|]..longd|
|00000d70| 69 76 09 70 6f 70 2e 6c | 09 64 32 09 3b 20 44 32 |iv.pop.l|.d2.; D2|
|00000d80| 20 3d 20 64 69 76 69 73 | 6f 72 0d 09 09 70 6f 70 | = divis|or...pop|
|00000d90| 2e 6c 09 64 30 0d 09 09 | 6d 6f 76 65 2e 6c 09 28 |.l.d0...|move.l.(|
|00000da0| 61 36 29 2c 64 31 09 3b | 20 44 30 2f 31 20 3d 20 |a6),d1.;| D0/1 = |
|00000db0| 64 69 76 69 64 65 6e 64 | 0d 09 09 63 6d 70 2e 6c |dividend|...cmp.l|
|00000dc0| 09 64 32 2c 64 30 0d 09 | 09 62 68 73 2e 73 09 64 |.d2,d0..|.bhs.s.d|
|00000dd0| 69 63 5b 64 69 76 5f 6f | 76 65 72 66 6c 6f 77 5d |ic[div_o|verflow]|
|00000de0| 0d 09 09 6d 6f 76 65 2e | 6c 09 64 33 2c 2d 28 61 |...move.|l.d3,-(a|
|00000df0| 37 29 0d 09 09 6d 6f 76 | 65 71 09 23 33 31 2c 64 |7)...mov|eq.#31,d|
|00000e00| 33 0d 0d 6c 6f 6f 70 09 | 61 73 6c 2e 6c 09 23 31 |3..loop.|asl.l.#1|
|00000e10| 2c 64 31 0d 09 09 72 6f | 78 6c 2e 6c 09 23 31 2c |,d1...ro|xl.l.#1,|
|00000e20| 64 30 0d 09 09 62 63 73 | 2e 73 09 64 6f 73 75 62 |d0...bcs|.s.dosub|
|00000e30| 0d 09 09 63 6d 70 2e 6c | 09 64 32 2c 64 30 0d 09 |...cmp.l|.d2,d0..|
|00000e40| 09 62 6c 6f 2e 73 09 6c | 70 74 65 73 74 0d 64 6f |.blo.s.l|ptest.do|
|00000e50| 73 75 62 09 73 75 62 2e | 6c 09 64 32 2c 64 30 0d |sub.sub.|l.d2,d0.|
|00000e60| 09 09 61 64 64 71 09 23 | 31 2c 64 31 0d 6c 70 74 |..addq.#|1,d1.lpt|
|00000e70| 65 73 74 09 64 62 72 61 | 09 64 33 2c 6c 6f 6f 70 |est.dbra|.d3,loop|
|00000e80| 0d 0d 09 09 6d 6f 76 65 | 2e 6c 09 28 61 37 29 2b |....move|.l.(a7)+|
|00000e90| 2c 64 33 0d 09 09 6d 6f | 76 65 2e 6c 09 64 30 2c |,d3...mo|ve.l.d0,|
|00000ea0| 28 61 36 29 09 09 09 3b | 20 50 75 73 68 20 72 65 |(a6)...;| Push re|
|00000eb0| 6d 61 69 6e 64 65 72 0d | 09 09 70 75 73 68 2e 6c |mainder.|..push.l|
|00000ec0| 09 64 31 09 09 09 09 3b | 20 61 6e 64 20 71 75 6f |.d1....;| and quo|
|00000ed0| 74 69 65 6e 74 0d 3b 63 | 6f 64 65 0d 0d 0d 3a 63 |tient.;c|ode...:c|
|00000ee0| 6f 64 65 20 20 4d 2f 4d | 4f 44 20 20 3b 20 28 20 |ode M/M|OD ; ( |
|00000ef0| 64 20 6e 20 2d 2d 20 72 | 65 6d 20 71 75 6f 74 20 |d n -- r|em quot |
|00000f00| 29 20 20 53 69 67 6e 65 | 64 20 6d 69 78 65 64 20 |) Signe|d mixed |
|00000f10| 64 69 76 69 73 69 6f 6e | 0d 0d 09 09 62 72 61 2e |division|....bra.|
|00000f20| 73 09 70 36 38 6b 09 09 | 09 3b 20 4e 4f 50 27 64 |s.p68k..|.; NOP'd|
|00000f30| 20 6f 75 74 20 69 66 20 | 77 65 27 72 65 20 6f 6e | out if |we're on|
|00000f40| 20 61 6e 20 30 32 30 2f | 30 33 30 20 6f 72 20 6c | an 020/|030 or l|
|00000f50| 61 74 65 72 0d 0d 09 09 | 6d 6f 76 65 6d 2e 6c 09 |ater....|movem.l.|
|00000f60| 28 61 36 29 2b 2c 64 30 | 2d 64 32 09 09 3b 20 44 |(a6)+,d0|-d2..; D|
|00000f70| 69 76 69 73 6f 72 20 74 | 6f 20 44 30 2c 20 64 69 |ivisor t|o D0, di|
|00000f80| 76 69 64 65 6e 64 20 74 | 6f 20 44 31 2d 32 0d 09 |vidend t|o D1-2..|
|00000f90| 09 64 63 2e 77 09 24 34 | 43 34 30 2c 24 32 43 30 |.dc.w.$4|C40,$2C0|
|00000fa0| 31 09 09 3b 20 64 69 76 | 73 2e 6c 20 20 64 30 2c |1..; div|s.l d0,|
|00000fb0| 64 31 3a 64 32 0d 09 09 | 70 75 73 68 2e 6c 09 64 |d1:d2...|push.l.d|
|00000fc0| 31 09 09 09 09 3b 20 50 | 75 73 68 20 72 65 6d 61 |1....; P|ush rema|
|00000fd0| 69 6e 64 65 72 0d 09 09 | 70 75 73 68 2e 6c 09 64 |inder...|push.l.d|
|00000fe0| 32 09 09 09 09 3b 20 50 | 75 73 68 20 71 75 6f 74 |2....; P|ush quot|
|00000ff0| 69 65 6e 74 0d 09 09 72 | 74 73 0d 0d 70 36 38 6b |ient...r|ts..p68k|
|00001000| 09 6d 6f 76 65 6d 2e 6c | 09 64 33 2d 64 34 2c 2d |.movem.l|.d3-d4,-|
|00001010| 28 61 37 29 09 09 3b 20 | 53 61 76 65 20 72 65 67 |(a7)..; |Save reg|
|00001020| 73 0d 09 09 74 73 74 2e | 6c 09 28 61 36 29 09 09 |s...tst.|l.(a6)..|
|00001030| 09 3b 20 57 65 20 6d 61 | 6b 65 20 65 76 65 72 79 |.; We ma|ke every|
|00001040| 74 68 69 6e 67 0d 09 09 | 73 6d 69 09 64 33 09 09 |thing...|smi.d3..|
|00001050| 09 09 09 3b 20 70 6f 73 | 69 74 69 76 65 20 74 68 |...; pos|itive th|
|00001060| 65 6e 20 63 61 6c 6c 20 | 75 6d 2f 6d 6f 64 2e 0d |en call |um/mod..|
|00001070| 09 09 62 70 6c 2e 73 09 | 6d 6d 31 0d 09 09 6e 65 |..bpl.s.|mm1...ne|
|00001080| 67 2e 6c 09 28 61 36 29 | 0d 6d 6d 31 09 09 74 73 |g.l.(a6)|.mm1..ts|
|00001090| 74 2e 6c 09 34 28 61 36 | 29 0d 09 09 73 6d 69 09 |t.l.4(a6|)...smi.|
|000010a0| 64 34 0d 09 09 62 70 6c | 2e 73 09 6d 6d 32 0d 09 |d4...bpl|.s.mm2..|
|000010b0| 09 6e 65 67 2e 6c 09 38 | 28 61 36 29 0d 09 09 6e |.neg.l.8|(a6)...n|
|000010c0| 65 67 78 2e 6c 09 34 28 | 61 36 29 0d 0d 6d 6d 32 |egx.l.4(|a6)..mm2|
|000010d0| 09 09 62 73 72 2e 73 09 | 75 6d 6d 6f 64 0d 09 09 |..bsr.s.|ummod...|
|000010e0| 74 73 74 2e 6c 09 34 28 | 61 36 29 0d 09 09 62 6d |tst.l.4(|a6)...bm|
|000010f0| 69 09 64 69 63 5b 64 69 | 76 5f 6f 76 65 72 66 6c |i.dic[di|v_overfl|
|00001100| 6f 77 5d 0d 09 09 65 6f | 72 2e 62 09 64 34 2c 64 |ow]...eo|r.b.d4,d|
|00001110| 33 09 09 09 3b 20 53 65 | 74 20 73 69 67 6e 20 6f |3...; Se|t sign o|
|00001120| 66 20 71 75 6f 74 69 65 | 6e 74 0d 09 09 62 70 6c |f quotie|nt...bpl|
|00001130| 2e 73 09 6d 6d 33 0d 09 | 09 6e 65 67 2e 6c 09 28 |.s.mm3..|.neg.l.(|
|00001140| 61 36 29 0d 6d 6d 33 09 | 09 74 73 74 2e 62 09 64 |a6).mm3.|.tst.b.d|
|00001150| 34 09 09 09 09 3b 20 53 | 65 74 20 73 69 67 6e 20 |4....; S|et sign |
|00001160| 6f 66 20 72 65 6d 61 69 | 6e 64 65 72 20 2d 20 73 |of remai|nder - s|
|00001170| 61 6d 65 20 61 73 20 64 | 69 76 69 64 65 6e 64 2c |ame as d|ividend,|
|00001180| 0d 09 09 62 70 6c 2e 73 | 09 72 74 6e 09 09 09 09 |...bpl.s|.rtn....|
|00001190| 3b 20 77 68 69 63 68 20 | 69 73 20 64 69 66 66 65 |; which |is diffe|
|000011a0| 72 65 6e 74 20 66 72 6f | 6d 20 6f 72 69 67 69 6e |rent fro|m origin|
|000011b0| 61 6c 20 4e 65 6f 6e 2e | 0d 09 09 6e 65 67 2e 6c |al Neon.|...neg.l|
|000011c0| 09 34 28 61 36 29 09 09 | 09 3b 20 59 65 73 2c 20 |.4(a6)..|.; Yes, |
|000011d0| 74 68 69 73 20 77 61 73 | 20 61 20 62 75 67 21 0d |this was| a bug!.|
|000011e0| 72 74 6e 09 09 6d 6f 76 | 65 6d 2e 6c 09 28 61 37 |rtn..mov|em.l.(a7|
|000011f0| 29 2b 2c 64 33 2d 64 34 | 09 09 3b 20 52 65 73 74 |)+,d3-d4|..; Rest|
|00001200| 6f 72 65 20 72 65 67 73 | 20 61 6e 64 20 72 65 74 |ore regs| and ret|
|00001210| 75 72 6e 0d 3b 63 6f 64 | 65 0d 0d 0d 3a 20 2a 2f |urn.;cod|e...: */|
|00001220| 4d 4f 44 09 09 3e 72 20 | 20 6d 2a 20 20 72 3e 20 |MOD..>r | m* r> |
|00001230| 20 6d 2f 6d 6f 64 20 20 | 3b 0d 0d 3a 20 2a 2f 09 | m/mod |;..: */.|
|00001240| 09 2a 2f 6d 6f 64 20 20 | 6e 69 70 20 20 3b 0d 0d |.*/mod |nip ;..|
|00001250| 3a 20 55 4d 44 2f 4d 4f | 44 20 20 7b 20 64 6e 64 |: UMD/MO|D { dnd|
|00001260| 4c 20 64 6e 64 48 20 64 | 73 72 20 5c 20 71 75 6f |L dndH d|sr \ quo|
|00001270| 74 48 20 2d 2d 20 72 65 | 6d 20 71 75 6f 74 4c 20 |tH -- re|m quotL |
|00001280| 71 75 6f 74 48 20 7d 0d | 09 64 6e 64 4c 0d 09 64 |quotH }.|.dndL..d|
|00001290| 6e 64 48 20 30 20 20 64 | 73 72 20 20 75 6d 2f 6d |ndH 0 d|sr um/m|
|000012a0| 6f 64 20 20 2d 3e 20 71 | 75 6f 74 48 0d 09 28 20 |od -> q|uotH..( |
|000012b0| 64 6e 64 4c 20 72 65 6d | 31 20 29 20 64 73 72 20 |dndL rem|1 ) dsr |
|000012c0| 20 75 6d 2f 6d 6f 64 20 | 20 71 75 6f 74 48 20 20 | um/mod | quotH |
|000012d0| 3b 0d 0d 0d 5c 20 46 4d | 2f 4d 4f 44 20 61 6e 64 |;...\ FM|/MOD and|
|000012e0| 20 53 4d 2f 52 45 4d 20 | 61 72 65 20 74 68 65 20 | SM/REM |are the |
|000012f0| 41 4e 53 49 20 64 69 76 | 69 73 69 6f 6e 20 77 6f |ANSI div|ision wo|
|00001300| 72 64 73 20 66 6f 72 63 | 69 6e 67 20 66 6c 6f 6f |rds forc|ing floo|
|00001310| 72 65 64 20 61 6e 64 20 | 73 79 6d 6d 65 74 72 69 |red and |symmetri|
|00001320| 63 0d 5c 20 64 69 76 69 | 73 69 6f 6e 20 72 65 73 |c.\ divi|sion res|
|00001330| 70 65 63 74 69 76 65 6c | 79 2e 20 20 54 68 65 20 |pectivel|y. The |
|00001340| 36 38 30 78 30 20 73 69 | 67 6e 65 64 20 64 69 76 |680x0 si|gned div|
|00001350| 69 73 69 6f 6e 20 69 73 | 20 73 79 6d 6d 65 74 72 |ision is| symmetr|
|00001360| 69 63 2c 20 73 6f 20 74 | 68 61 74 0d 5c 20 69 73 |ic, so t|hat.\ is|
|00001370| 2c 20 6e 61 74 75 72 61 | 6c 6c 79 2c 20 74 68 65 |, natura|lly, the|
|00001380| 20 4d 6f 70 73 20 64 65 | 66 61 75 6c 74 20 28 64 | Mops de|fault (d|
|00001390| 65 66 69 6e 65 64 20 62 | 79 20 4d 2f 4d 4f 44 29 |efined b|y M/MOD)|
|000013a0| 2e 20 20 46 6f 72 20 46 | 4d 2f 4d 4f 44 20 77 65 |. For F|M/MOD we|
|000013b0| 20 68 61 76 65 0d 5c 20 | 74 6f 20 64 6f 20 61 20 | have.\ |to do a |
|000013c0| 6c 69 74 74 6c 65 20 77 | 6f 72 6b 2e 0d 0d 3a 20 |little w|ork...: |
|000013d0| 53 4d 2f 52 45 4d 09 5c | 20 28 20 64 20 6e 20 2d |SM/REM.\| ( d n -|
|000013e0| 2d 20 72 65 6d 20 71 75 | 6f 74 20 29 0d 09 6d 2f |- rem qu|ot )..m/|
|000013f0| 6d 6f 64 20 20 3b 0d 0d | 5c 20 46 4d 2f 4d 4f 44 |mod ;..|\ FM/MOD|
|00001400| 20 20 28 20 64 20 6e 20 | 2d 2d 20 6d 6f 64 20 71 | ( d n |-- mod q|
|00001410| 75 6f 74 20 29 0d 5c 20 | 49 66 20 74 68 65 20 73 |uot ).\ |If the s|
|00001420| 69 67 6e 73 20 6f 66 20 | 74 68 65 20 64 69 76 69 |igns of |the divi|
|00001430| 73 6f 72 20 61 6e 64 20 | 64 69 76 69 64 65 6e 64 |sor and |dividend|
|00001440| 20 61 72 65 20 74 68 65 | 20 73 61 6d 65 2c 20 74 | are the| same, t|
|00001450| 68 65 20 72 65 73 75 6c | 74 20 69 73 0d 5c 20 69 |he resul|t is.\ i|
|00001460| 64 65 6e 74 69 63 61 6c | 20 74 6f 20 53 4d 2f 52 |dentical| to SM/R|
|00001470| 45 4d 20 28 69 2e 65 2e | 20 4d 2f 4d 4f 44 29 2c |EM (i.e.| M/MOD),|
|00001480| 20 61 73 20 69 74 20 69 | 73 20 69 66 20 74 68 65 | as it i|s if the|
|00001490| 20 73 69 67 6e 73 20 64 | 69 66 66 65 72 20 62 75 | signs d|iffer bu|
|000014a0| 74 0d 5c 20 74 68 65 20 | 72 65 6d 61 69 6e 64 65 |t.\ the |remainde|
|000014b0| 72 20 66 72 6f 6d 20 63 | 61 6c 6c 69 6e 67 20 4d |r from c|alling M|
|000014c0| 2f 4d 4f 44 20 69 73 20 | 7a 65 72 6f 2e 20 20 49 |/MOD is |zero. I|
|000014d0| 66 20 74 68 65 20 72 65 | 6d 61 69 6e 64 65 72 20 |f the re|mainder |
|000014e0| 69 73 20 6e 6f 6e 2d 7a | 65 72 6f 2c 0d 5c 20 77 |is non-z|ero,.\ w|
|000014f0| 65 20 6e 65 65 64 20 74 | 6f 20 61 64 6a 75 73 74 |e need t|o adjust|
|00001500| 20 62 79 20 73 75 62 74 | 72 61 63 74 69 6e 67 20 | by subt|racting |
|00001510| 31 20 66 72 6f 6d 20 74 | 68 65 20 71 75 6f 74 69 |1 from t|he quoti|
|00001520| 65 6e 74 2c 20 61 6e 64 | 20 61 64 64 69 6e 67 20 |ent, and| adding |
|00001530| 74 68 65 0d 5c 20 64 69 | 76 69 73 6f 72 20 74 6f |the.\ di|visor to|
|00001540| 20 74 68 65 20 72 65 6d | 61 69 6e 64 65 72 2e 20 | the rem|ainder. |
|00001550| 20 54 68 69 73 20 77 6f | 72 6b 73 20 77 68 69 63 | This wo|rks whic|
|00001560| 68 65 76 65 72 20 77 61 | 79 20 61 72 6f 75 6e 64 |hever wa|y around|
|00001570| 20 74 68 65 20 73 69 67 | 6e 73 20 61 72 65 2e 0d | the sig|ns are..|
|00001580| 0d 3a 63 6f 64 65 20 20 | 46 4d 2f 4d 4f 44 0d 09 |.:code |FM/MOD..|
|00001590| 09 6c 6f 63 0d 09 09 6d | 6f 76 65 2e 6c 09 28 61 |.loc...m|ove.l.(a|
|000015a0| 36 29 2c 64 30 0d 09 09 | 6d 6f 76 65 2e 6c 09 34 |6),d0...|move.l.4|
|000015b0| 28 61 36 29 2c 64 31 0d | 09 09 65 6f 72 2e 6c 09 |(a6),d1.|..eor.l.|
|000015c0| 64 30 2c 64 31 0d 09 09 | 62 70 6c 09 09 64 69 63 |d0,d1...|bpl..dic|
|000015d0| 5b 6d 2f 6d 6f 64 5d 09 | 09 3b 20 53 69 67 6e 73 |[m/mod].|.; Signs|
|000015e0| 20 73 61 6d 65 20 2d 20 | 63 61 6c 6c 20 4d 2f 4d | same - |call M/M|
|000015f0| 4f 44 20 61 6e 64 20 6f | 75 74 2e 0d 09 09 6d 6f |OD and o|ut....mo|
|00001600| 76 65 2e 6c 09 28 61 36 | 29 2c 2d 28 61 37 29 09 |ve.l.(a6|),-(a7).|
|00001610| 09 3b 20 53 69 67 6e 73 | 20 64 69 66 66 65 72 2e |.; Signs| differ.|
|00001620| 20 20 53 61 76 65 20 64 | 69 76 69 73 6f 72 0d 09 | Save d|ivisor..|
|00001630| 09 62 73 72 09 09 64 69 | 63 5b 6d 2f 6d 6f 64 5d |.bsr..di|c[m/mod]|
|00001640| 09 09 3b 20 43 61 6c 6c | 20 4d 2f 4d 4f 44 0d 09 |..; Call| M/MOD..|
|00001650| 09 6d 6f 76 65 2e 6c 09 | 28 61 37 29 2b 2c 64 30 |.move.l.|(a7)+,d0|
|00001660| 09 09 3b 20 52 65 63 6f | 76 65 72 20 64 69 76 69 |..; Reco|ver divi|
|00001670| 73 6f 72 20 74 6f 20 44 | 30 0d 09 09 74 73 74 2e |sor to D|0...tst.|
|00001680| 6c 09 34 28 61 36 29 09 | 09 09 3b 20 52 65 6d 61 |l.4(a6).|..; Rema|
|00001690| 69 6e 64 65 72 20 7a 65 | 72 6f 3f 0d 09 09 62 65 |inder ze|ro?...be|
|000016a0| 71 2e 73 09 6f 75 74 09 | 09 09 09 3b 20 59 65 73 |q.s.out.|...; Yes|
|000016b0| 20 2d 20 77 65 27 72 65 | 20 66 69 6e 69 73 68 65 | - we're| finishe|
|000016c0| 64 2e 0d 09 09 73 75 62 | 71 2e 6c 09 23 31 2c 28 |d....sub|q.l.#1,(|
|000016d0| 61 36 29 09 09 09 3b 20 | 4e 6f 20 2d 20 64 6f 20 |a6)...; |No - do |
|000016e0| 61 64 6a 75 73 74 6d 65 | 6e 74 2e 0d 09 09 61 64 |adjustme|nt....ad|
|000016f0| 64 2e 6c 09 64 30 2c 34 | 28 61 36 29 0d 6f 75 74 |d.l.d0,4|(a6).out|
|00001700| 0d 3b 63 6f 64 65 0d 0d | 0d 5c 20 4e 75 6d 41 63 |.;code..|.\ NumAc|
|00001710| 63 75 6d 75 6c 61 74 65 | 20 28 20 75 64 31 20 64 |cumulate| ( ud1 d|
|00001720| 69 67 69 74 20 2d 2d 20 | 75 64 32 20 29 20 69 73 |igit -- |ud2 ) is|
|00001730| 20 61 20 76 65 63 74 6f | 72 20 63 61 6c 6c 65 64 | a vecto|r called|
|00001740| 20 62 79 20 3e 4e 55 4d | 42 45 52 2e 20 20 49 74 | by >NUM|BER. It|
|00001750| 0d 5c 20 6d 75 6c 74 69 | 70 6c 69 65 73 20 75 64 |.\ multi|plies ud|
|00001760| 31 20 62 79 20 42 41 53 | 45 2c 20 74 68 65 6e 20 |1 by BAS|E, then |
|00001770| 61 64 64 73 20 74 68 65 | 20 64 69 67 69 74 2e 20 |adds the| digit. |
|00001780| 20 49 6e 20 74 68 65 20 | 6e 75 63 6c 65 75 73 20 | In the |nucleus |
|00001790| 77 65 20 64 6f 6e 27 74 | 0d 5c 20 69 6d 70 6c 65 |we don't|.\ imple|
|000017a0| 6d 65 6e 74 20 64 6f 75 | 62 6c 65 2d 6c 65 6e 67 |ment dou|ble-leng|
|000017b0| 74 68 20 61 72 69 74 68 | 6d 65 74 69 63 2c 20 73 |th arith|metic, s|
|000017c0| 6f 20 77 65 20 69 67 6e | 6f 72 65 20 74 68 65 20 |o we ign|ore the |
|000017d0| 68 69 20 63 65 6c 6c 20 | 6f 66 20 75 64 31 2c 0d |hi cell |of ud1,.|
|000017e0| 5c 20 61 6e 64 20 70 75 | 74 20 7a 65 72 6f 20 69 |\ and pu|t zero i|
|000017f0| 6e 20 74 68 65 20 68 69 | 20 63 65 6c 6c 20 6f 66 |n the hi| cell of|
|00001800| 20 75 64 32 2e 20 20 48 | 65 72 65 20 77 65 20 69 | ud2. H|ere we i|
|00001810| 6d 70 6c 65 6d 65 6e 74 | 20 61 20 70 72 6f 70 65 |mplement| a prope|
|00001820| 72 0d 5c 20 64 6f 75 62 | 6c 65 2d 6c 65 6e 67 74 |r.\ doub|le-lengt|
|00001830| 68 20 76 65 72 73 69 6f | 6e 2e 0d 0d 3a 20 28 4e |h versio|n...: (N|
|00001840| 75 6d 41 63 63 29 20 20 | 7b 20 75 64 4c 20 75 64 |umAcc) |{ udL ud|
|00001850| 48 20 64 69 67 20 5c 20 | 70 72 6f 64 31 48 20 2d |H dig \ |prod1H -|
|00001860| 2d 20 75 64 32 20 7d 0d | 09 09 75 64 4c 20 62 61 |- ud2 }.|..udL ba|
|00001870| 73 65 20 75 6d 2a 20 20 | 2d 3e 20 70 72 6f 64 31 |se um* |-> prod1|
|00001880| 48 0d 09 09 75 64 48 20 | 62 61 73 65 20 2a 20 20 |H...udH |base * |
|00001890| 70 72 6f 64 31 48 20 2b | 0d 09 09 64 69 67 20 30 |prod1H +|...dig 0|
|000018a0| 20 20 64 2b 20 20 3b 0d | 0d 27 20 28 6e 75 6d 41 | d+ ;.|.' (numA|
|000018b0| 63 63 29 20 20 2d 3e 20 | 4e 75 6d 41 63 63 75 6d |cc) -> |NumAccum|
|000018c0| 75 6c 61 74 65 0d 0d 0d | 5c 20 23 20 69 6e 20 74 |ulate...|\ # in t|
|000018d0| 68 65 20 6e 75 63 6c 65 | 75 73 20 69 67 6e 6f 72 |he nucle|us ignor|
|000018e0| 65 73 20 74 68 65 20 68 | 69 20 63 65 6c 6c 20 6f |es the h|i cell o|
|000018f0| 66 20 74 68 65 20 64 6f | 75 62 6c 65 20 6f 70 65 |f the do|uble ope|
|00001900| 72 61 6e 64 2e 20 20 48 | 65 72 65 0d 5c 20 77 65 |rand. H|ere.\ we|
|00001910| 20 70 72 6f 76 69 64 65 | 20 61 20 72 65 61 6c 20 | provide| a real |
|00001920| 64 6f 75 62 6c 65 20 76 | 65 72 73 69 6f 6e 2e 0d |double v|ersion..|
|00001930| 0d 3a 20 23 0d 09 62 61 | 73 65 20 20 75 6d 64 2f |.: #..ba|se umd/|
|00001940| 6d 6f 64 20 20 72 6f 74 | 20 39 20 6f 76 65 72 20 |mod rot| 9 over |
|00001950| 3c 0d 09 49 46 09 37 20 | 2b 20 20 54 48 45 4e 0d |<..IF.7 |+ THEN.|
|00001960| 09 24 20 33 30 20 2b 20 | 20 68 6f 6c 64 20 20 3b |.$ 30 + | hold ;|
|00001970| 0d 09 0d 3a 20 23 53 0d | 09 42 45 47 49 4e 20 20 |...: #S.|.BEGIN |
|00001980| 23 20 20 32 64 75 70 20 | 6f 72 20 20 4e 55 4e 54 |# 2dup |or NUNT|
|00001990| 49 4c 20 20 3b 0d 0d 5c | 20 43 61 6c 6c 20 69 6e |IL ;..\| Call in|
|000019a0| 69 74 4c 6f 6e 67 4d 61 | 74 68 20 62 65 66 6f 72 |itLongMa|th befor|
|000019b0| 65 20 75 73 69 6e 67 20 | 61 6e 79 20 4c 6f 6e 67 |e using |any Long|
|000019c0| 4d 61 74 68 20 77 6f 72 | 64 73 2e 20 20 41 74 20 |Math wor|ds. At |
|000019d0| 70 72 65 73 65 6e 74 20 | 61 6c 6c 20 69 74 0d 5c |present |all it.\|
|000019e0| 20 64 6f 65 73 20 69 73 | 20 74 6f 20 74 65 73 74 | does is| to test|
|000019f0| 20 77 68 61 74 20 70 72 | 6f 63 65 73 73 6f 72 20 | what pr|ocessor |
|00001a00| 77 65 27 72 65 20 72 75 | 6e 6e 69 6e 67 20 6f 6e |we're ru|nning on|
|00001a10| 2c 20 61 6e 64 20 70 61 | 74 63 68 20 74 68 65 20 |, and pa|tch the |
|00001a20| 77 6f 72 64 73 20 74 6f | 0d 5c 20 75 73 65 20 74 |words to|.\ use t|
|00001a30| 68 65 20 30 32 30 2f 30 | 33 30 20 6c 6f 6e 67 20 |he 020/0|30 long |
|00001a40| 6d 75 6c 74 20 61 6e 64 | 20 64 69 76 20 69 6e 73 |mult and| div ins|
|00001a50| 74 72 75 63 74 69 6f 6e | 73 20 69 66 20 74 68 65 |truction|s if the|
|00001a60| 79 20 65 78 69 73 74 2e | 20 20 54 68 69 73 20 77 |y exist.| This w|
|00001a70| 69 6c 6c 0d 5c 20 69 6d | 70 72 6f 76 65 20 74 68 |ill.\ im|prove th|
|00001a80| 65 20 70 65 72 66 6f 72 | 6d 61 6e 63 65 20 73 69 |e perfor|mance si|
|00001a90| 67 6e 69 66 69 63 61 6e | 74 6c 79 2e 0d 0d 3a 20 |gnifican|tly...: |
|00001aa0| 49 4e 49 54 4c 4f 4e 47 | 4d 41 54 48 20 20 7b 20 |INITLONG|MATH { |
|00001ab0| 5c 20 6e 6f 70 20 2d 2d | 20 7d 0d 09 70 72 6f 63 |\ nop --| }..proc|
|00001ac0| 65 73 73 6f 72 20 20 32 | 20 3c 3d 20 3f 45 58 49 |essor 2| <= ?EXI|
|00001ad0| 54 09 09 5c 20 4f 75 74 | 20 69 66 20 36 38 30 30 |T..\ Out| if 6800|
|00001ae0| 30 2f 36 38 30 31 30 0d | 09 24 20 34 45 37 31 20 |0/68010.|.$ 4E71 |
|00001af0| 20 2d 3e 20 6e 6f 70 0d | 09 6e 6f 70 20 20 5b 27 | -> nop.|.nop ['|
|00001b00| 5d 20 75 6d 2a 09 77 21 | 0d 09 6e 6f 70 20 20 5b |] um*.w!|..nop [|
|00001b10| 27 5d 20 6d 2a 09 77 21 | 0d 09 6e 6f 70 20 20 5b |'] m*.w!|..nop [|
|00001b20| 27 5d 20 75 6d 2f 6d 6f | 64 09 77 21 0d 09 6e 6f |'] um/mo|d.w!..no|
|00001b30| 70 20 20 5b 27 5d 20 6d | 2f 6d 6f 64 09 77 21 0d |p ['] m|/mod.w!.|
|00001b40| 09 70 61 74 63 68 65 73 | 5f 64 6f 6e 65 20 20 3b |.patches|_done ;|
|00001b50| 0d 09 0d 27 20 69 6e 69 | 74 4c 6f 6e 67 4d 61 74 |...' ini|tLongMat|
|00001b60| 68 20 20 61 64 64 3a 20 | 69 6e 69 74 5f 61 63 74 |h add: |init_act|
|00001b70| 69 6f 6e 73 0d 0d 65 6e | 64 6c 6f 61 64 0d 0d 5c |ions..en|dload..\|
|00001b80| 20 43 6f 6d 6d 65 6e 74 | 20 6f 75 74 20 74 68 65 | Comment| out the|
|00001b90| 20 65 6e 64 6c 6f 61 64 | 20 66 6f 72 20 4e 65 6f | endload| for Neo|
|00001ba0| 6e 20 63 6f 6d 70 61 74 | 69 62 69 6c 69 74 79 2e |n compat|ibility.|
|00001bb0| 20 20 57 65 27 76 65 20 | 75 73 65 64 20 41 4e 53 | We've |used ANS|
|00001bc0| 49 20 46 6f 72 74 68 0d | 5c 20 77 6f 72 64 20 6e |I Forth.|\ word n|
|00001bd0| 61 6d 65 73 2c 20 62 75 | 74 20 74 68 65 73 65 20 |ames, bu|t these |
|00001be0| 61 72 65 20 72 65 64 65 | 66 69 6e 65 64 20 74 6f |are rede|fined to|
|00001bf0| 20 74 68 65 69 72 20 4e | 65 6f 6e 20 65 71 75 69 | their N|eon equi|
|00001c00| 76 61 6c 65 6e 74 73 20 | 62 65 6c 6f 77 2e 0d 5c |valents |below..\|
|00001c10| 20 49 20 68 6f 70 65 20 | 79 6f 75 20 64 6f 6e 27 | I hope |you don'|
|00001c20| 74 20 66 69 6e 64 20 74 | 68 65 73 65 20 76 61 72 |t find t|hese var|
|00001c30| 69 6f 75 73 20 77 6f 72 | 64 20 6e 61 6d 65 73 20 |ious wor|d names |
|00001c40| 61 73 20 63 6f 6e 66 75 | 73 69 6e 67 20 61 73 20 |as confu|sing as |
|00001c50| 49 20 64 6f 2e 0d 0d 3a | 20 53 2d 3e 44 09 73 3e |I do...:| S->D.s>|
|00001c60| 64 20 20 3b 0d 3a 20 55 | 2a 09 75 6d 2a 20 20 3b |d ;.: U|*.um* ;|
|00001c70| 0d 3a 20 55 2f 09 75 6d | 2f 6d 6f 64 20 20 3b 0d |.: U/.um|/mod ;.|
|00001c80| 3a 20 4d 2f 09 6d 2f 6d | 6f 64 20 20 3b 0d 3a 20 |: M/.m/m|od ;.: |
|00001c90| 4d 2f 4d 4f 44 09 75 6d | 64 2f 6d 6f 64 20 20 3b |M/MOD.um|d/mod ;|
|00001ca0| 0d 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001cc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001cd0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001ce0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001cf0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d00| 00 00 01 00 00 00 01 42 | 00 00 00 42 00 00 00 3b |.......B|...B...;|
|00001d10| 74 2e 05 50 61 67 65 73 | 0e 50 61 69 6e 74 20 54 |t..Pages|.Paint T|
|00001d20| 68 65 20 54 6f 77 6e 0d | 50 61 6c 65 73 74 69 6e |he Town.|Palestin|
|00001d30| 08 6c 6f 6e 67 4d 61 74 | 68 6e 02 00 00 00 50 61 |.longMat|hn....Pa|
|00001d40| 72 74 53 49 54 21 00 00 | 00 00 00 00 00 00 00 01 |rtSIT!..|........|
|00001d50| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00001d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d70| 00 00 b3 66 c2 78 00 00 | 00 00 00 00 01 7d 53 41 |...f.x..|.....}SA|
|00001d80| 0c 50 72 69 6e 74 4d 6f | 6e 69 74 6f 72 08 50 72 |.PrintMo|nitor.Pr|
|00001d90| 6f 63 45 64 69 74 0b 50 | 72 6f 67 72 61 6d 6d 69 |ocEdit.P|rogrammi|
|00001da0| 6e 67 08 50 72 6f 6a 65 | 63 74 73 08 50 53 20 66 |ng.Proje|cts.PS f|
|00001db0| 6f 6e 74 73 09 50 75 62 | 6c 69 63 42 2e 70 05 71 |onts.Pub|licB.p.q|
|00001dc0| 2e 7a 69 70 06 71 61 6c | 6f 69 73 07 71 61 6e 64 |.zip.qal|ois.qand|
|00001dd0| 72 65 77 04 71 62 6f 62 | 06 71 64 65 72 65 6b 05 |rew.qbob|.qderek.|
|00001de0| 71 64 6f 75 67 06 71 64 | 6f 75 67 70 03 71 65 64 |qdoug.qd|ougp.qed|
|00001df0| 06 71 67 72 61 6e 74 06 | 71 6a 6f 65 72 67 05 71 |.qgrant.|qjoerg.q|
|00001e00| 00 00 00 3e 00 00 00 00 | 00 00 00 00 00 00 00 00 |...>....|........|
|00001e10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001e20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 02 2a |........|.......*|
|00001e30| 00 00 02 2a 00 00 00 00 | 00 00 00 00 00 00 00 00 |...*....|........|
|00001e40| 00 00 00 00 01 00 00 00 | 01 42 00 00 00 42 00 00 |........|.B...B..|
|00001e50| 00 3b 00 53 91 7c 12 5e | 00 00 00 1c 00 32 00 00 |.;.S.|.^|.....2..|
|00001e60| 4d 49 46 4f 00 00 00 0a | 00 80 00 00 00 00 00 00 |MIFO....|........|
|00001e70| 00 53 99 18 08 4d 69 73 | 63 49 6e 66 6f 00 00 00 |.S...Mis|cInfo...|
+--------+-------------------------+-------------------------+--------+--------+